import java.io.Serializable;

/**
 * La classe Passager fait parti du mini-projet "reservation".
 * 
 * 
 * @author Maugard Matthieu & Paeta Suzy
 * @version V 1.0.0
 */
public class Passager implements Serializable
{

	private String name;
	private String surname;
	
	/**
	 * Constructeur
	 * @param nom
	 * @param prenom
	 */
	public Passager(String nom, String prenom)
	{
		if(nom==null) throw new NullPointerException("Le nom est null");
		if(prenom==null) throw new NullPointerException("Le prenom est null");
		this.name = nom;
		this.surname = prenom;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		if(name==null) throw new NullPointerException("Le nom est null");
		this.name = name;
	}

	/**
	 * @return the surname
	 */
	public String getSurname() {
		return surname;
	}

	/**
	 * @param surname the surname to set
	 */
	public void setSurname(String surname) {
		if(surname==null) throw new NullPointerException("Le nom est null");
		this.surname = surname;
	}

	/**
	 * 
	 */
	public String toString() {
		return name + " " + surname + "\n";
	}
	
	
}
